package com.gxa.j259.springcloud.f.zipkin.config;

import brave.sampler.Sampler;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author thinknovo
 * @version 1.0
 */
@Configuration
public class ZipkinConfig {
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

    @Bean
    public Sampler defaultSampler() {
        // Zipkin 基础链路捕获配置
        return Sampler.ALWAYS_SAMPLE;
    }
}
